﻿@model IEnumerable<Comment>

    <h4>相关回复(@Model.Count())</h4>
<hr>
@if (!Model.Any())
{
    <div class="text-center mt-3">暂无任何数据</div>
}
else
{
    <ul class="list-unstyled">

        @foreach (var item in Model)
        {
            <li class="media mt-3 border p-2 rounded" id="comment-@item.Id">
                <div class="media-body">
                    <div class="">
                        @Html.Raw(item.Content)
                    </div>
                    <hr />
                    <ul class="list-inline text-muted text-sm pull-right">
                        @{

            var anonymousUser = (JsonConvert.DeserializeObject<AnonymousUserModel>(item.AnonymouseUserInfo));

                <li class="list-inline-item"><i class="fa fa-user"></i> @anonymousUser?.Name</li>
                        }
                        <li class="list-inline-item"><i class="fa fa-clock"></i> @item.CreatedTime.ToChineseDateTimeString()</li>
                    </ul>
                </div>
            </li>
        }
    </ul>
}